package com.qf.web.filter;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

//检查是否登陆
@WebFilter(filterName = "CheckUserFilter",value = {"/cartservlet","/orderservlet"})
public class CheckUserFilter implements Filter {
    public void destroy() {
    }

    public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws ServletException, IOException {
        //转换俩参数
        //接收sessin里面的user
        //判断是否为空
        chain.doFilter(req, resp);
    }

    public void init(FilterConfig config) throws ServletException {

    }

}
